/* Masonry layout for the gallery */
.filter-container {
    column-count: 4;       /* number of columns */
    column-gap: 20px;      /* gap between columns */
    width: 100%;
}

/* Each gallery item */
.filter {
    display: inline-block; /* required for column layout */
    width: 100%;           /* fill the column */
    margin-bottom: 20px;
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1),
                transform 0.3s cubic-bezier(0.4,0,0.2,1);
    transform-origin: top center;
    break-inside: avoid;   /* prevents splitting across columns */
    position: relative;
}

.filter-hidden {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    pointer-events: none;
}

/* Filter buttons */
.filter-buttons {
    margin-bottom: 20px;
    text-align: center;
}

.filter-button {
    display: inline-block;
    margin: 0 4px 8px 4px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-button:hover,
.filter-button.active {
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
}

/* Fancybox navigation arrows */
.fancybox-button--arrow_left,
.fancybox-button--arrow_right {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

.fancybox-button--arrow_left::before,
.fancybox-button--arrow_right::before {
    font-size: 30px;
    color: white;
}

/* Scrollable content for tall images */
.fancybox-content {
    max-height: 95vh;
    overflow-y: auto;
}

/* Images */
.filter img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.filter img:hover {
    transform: scale(1.03);
}

/* Post content */
.post-content { 
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background-color: rgba(255,255,255,0.7);
    padding-top: 3px;
    padding-bottom: 3px;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* Responsive columns */
@media (max-width: 1100px) { 
    .filter-container { column-count: 3; } 
}

@media (max-width: 760px)  { 
    .filter-container { column-count: 2; } 
}

@media (max-width: 480px)  { 
    .filter-container { column-count: 1; } 
}
